package com.dragon.modules.yuegou.query.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.system.ApplicationEntity;
import com.dragon.modules.yuegou.enums.system.ApplicationType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;
/**
 * 前端应用管理 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-05-07 11:01:06
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ApplicationQuery extends ApplicationEntity implements Query<ApplicationEntity> {


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 应用名称查询条件 */
	@JsonUnwrapped(prefix = "name")
	private Condition<String> nameCondition;

    /** 账号 小程序需要填写查询条件 */
	@JsonUnwrapped(prefix = "account")
	private Condition<String> accountCondition;

    /** 密码 小程序需要填写查询条件 */
	@JsonUnwrapped(prefix = "password")
	private Condition<String> passwordCondition;

    /** [枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<ApplicationType> typeCondition;

    /** 微信开放平台appid 小程序用自己的查询条件 */
	@JsonUnwrapped(prefix = "appid")
	private Condition<String> appidCondition;

    /** 原始ID查询条件 */
	@JsonUnwrapped(prefix = "originalid")
	private Condition<String> originalidCondition;

    /** 秘钥 小程序填写查询条件 */
	@JsonUnwrapped(prefix = "appsecret")
	private Condition<String> appsecretCondition;

    /** 公钥查询条件 */
	@JsonUnwrapped(prefix = "publicKey")
	private Condition<String> publicKeyCondition;

    /** 私钥查询条件 */
	@JsonUnwrapped(prefix = "privateKey")
	private Condition<String> privateKeyCondition;

    /** 验签查询条件 */
	@JsonUnwrapped(prefix = "decryptKey")
	private Condition<String> decryptKeyCondition;

    /** 签名查询条件 */
	@JsonUnwrapped(prefix = "signveriKey")
	private Condition<String> signveriKeyCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 小程序小程序码查询条件 */
	@JsonUnwrapped(prefix = "miniQrcodeUrl")
	private Condition<String> miniQrcodeUrlCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ApplicationQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ApplicationQuery(ApplicationEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ApplicationQuery(ApplicationQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.nameCondition != null) {
			this.nameCondition = other.nameCondition.copy();
		}
		if(other.accountCondition != null) {
			this.accountCondition = other.accountCondition.copy();
		}
		if(other.passwordCondition != null) {
			this.passwordCondition = other.passwordCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.appidCondition != null) {
			this.appidCondition = other.appidCondition.copy();
		}
		if(other.originalidCondition != null) {
			this.originalidCondition = other.originalidCondition.copy();
		}
		if(other.appsecretCondition != null) {
			this.appsecretCondition = other.appsecretCondition.copy();
		}
		this.setOtherQuery(other);
	}

	private void setOtherQuery(ApplicationQuery other){
		if(other.publicKeyCondition != null) {
			this.publicKeyCondition = other.publicKeyCondition.copy();
		}
		if(other.privateKeyCondition != null) {
			this.privateKeyCondition = other.privateKeyCondition.copy();
		}
		if(other.decryptKeyCondition != null) {
			this.decryptKeyCondition = other.decryptKeyCondition.copy();
		}
		if(other.signveriKeyCondition != null) {
			this.signveriKeyCondition = other.signveriKeyCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.miniQrcodeUrlCondition != null) {
			this.miniQrcodeUrlCondition = other.miniQrcodeUrlCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ApplicationEntity> toQueryWrapper() {
		QueryWrapper<ApplicationEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (nameCondition != null) {
			nameCondition.toWrapper(wrapper, COL_NAME);
		}
		if (accountCondition != null) {
			accountCondition.toWrapper(wrapper, COL_ACCOUNT);
		}
		if (passwordCondition != null) {
			passwordCondition.toWrapper(wrapper, COL_PASSWORD);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<ApplicationEntity> getQueryWrapper(QueryWrapper<ApplicationEntity> wrapper){
		if (appidCondition != null) {
			appidCondition.toWrapper(wrapper, COL_APPID);
		}
		if (originalidCondition != null) {
			originalidCondition.toWrapper(wrapper, COL_ORIGINALID);
		}
		if (appsecretCondition != null) {
			appsecretCondition.toWrapper(wrapper, COL_APPSECRET);
		}
		if (publicKeyCondition != null) {
			publicKeyCondition.toWrapper(wrapper, COL_PUBLIC_KEY);
		}
		if (privateKeyCondition != null) {
			privateKeyCondition.toWrapper(wrapper, COL_PRIVATE_KEY);
		}
		if (decryptKeyCondition != null) {
			decryptKeyCondition.toWrapper(wrapper, COL_DECRYPT_KEY);
		}
		if (signveriKeyCondition != null) {
			signveriKeyCondition.toWrapper(wrapper, COL_SIGNVERI_KEY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (miniQrcodeUrlCondition != null) {
			miniQrcodeUrlCondition.toWrapper(wrapper, COL_MINI_QRCODE_URL);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回应用名称查询条件
	 * 
	 * @return nameCondition 应用名称查询条件
	 */
	public Condition<String> name() {
		this.nameCondition = new Condition<>();
		return this.nameCondition;
	}
	
	/**
	 * 获取应用名称查询条件
	 * 
	 * @return nameCondition 应用名称查询条件
	 */
	public Condition<String> getNameCondition() {
		return nameCondition;
	}

	/**
	 * 设置应用名称查询条件
	 * 
	 * @param nameCondition 应用名称查询条件
	 */
	public void setNameCondition(Condition<String> nameCondition) {
		this.nameCondition = nameCondition;
	}

	/**
	 * 构造并返回账号 小程序需要填写查询条件
	 * 
	 * @return accountCondition 账号 小程序需要填写查询条件
	 */
	public Condition<String> account() {
		this.accountCondition = new Condition<>();
		return this.accountCondition;
	}
	
	/**
	 * 获取账号 小程序需要填写查询条件
	 * 
	 * @return accountCondition 账号 小程序需要填写查询条件
	 */
	public Condition<String> getAccountCondition() {
		return accountCondition;
	}

	/**
	 * 设置账号 小程序需要填写查询条件
	 * 
	 * @param accountCondition 账号 小程序需要填写查询条件
	 */
	public void setAccountCondition(Condition<String> accountCondition) {
		this.accountCondition = accountCondition;
	}

	/**
	 * 构造并返回密码 小程序需要填写查询条件
	 * 
	 * @return passwordCondition 密码 小程序需要填写查询条件
	 */
	public Condition<String> password() {
		this.passwordCondition = new Condition<>();
		return this.passwordCondition;
	}
	
	/**
	 * 获取密码 小程序需要填写查询条件
	 * 
	 * @return passwordCondition 密码 小程序需要填写查询条件
	 */
	public Condition<String> getPasswordCondition() {
		return passwordCondition;
	}

	/**
	 * 设置密码 小程序需要填写查询条件
	 * 
	 * @param passwordCondition 密码 小程序需要填写查询条件
	 */
	public void setPasswordCondition(Condition<String> passwordCondition) {
		this.passwordCondition = passwordCondition;
	}

	/**
	 * 构造并返回[枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 * 
	 * @return typeCondition [枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 */
	public Condition<ApplicationType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 * 
	 * @return typeCondition [枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 */
	public Condition<ApplicationType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 * 
	 * @param typeCondition [枚举]应用类型：0-悦购-YGIRL、1-悦荷包-WALLET、2-悦商管-YSQ、3-悦商惠-YSH、4-员工版-YGB、5-安卓-ANDROID、6-苹果-IOS、7-大运营版-PLATFORM、8-集团版-GROUP、9-支付宝小程序-ALIXCX查询条件
	 */
	public void setTypeCondition(Condition<ApplicationType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回微信开放平台appid 小程序用自己的查询条件
	 * 
	 * @return appidCondition 微信开放平台appid 小程序用自己的查询条件
	 */
	public Condition<String> appid() {
		this.appidCondition = new Condition<>();
		return this.appidCondition;
	}
	
	/**
	 * 获取微信开放平台appid 小程序用自己的查询条件
	 * 
	 * @return appidCondition 微信开放平台appid 小程序用自己的查询条件
	 */
	public Condition<String> getAppidCondition() {
		return appidCondition;
	}

	/**
	 * 设置微信开放平台appid 小程序用自己的查询条件
	 * 
	 * @param appidCondition 微信开放平台appid 小程序用自己的查询条件
	 */
	public void setAppidCondition(Condition<String> appidCondition) {
		this.appidCondition = appidCondition;
	}

	/**
	 * 构造并返回原始ID查询条件
	 * 
	 * @return originalidCondition 原始ID查询条件
	 */
	public Condition<String> originalid() {
		this.originalidCondition = new Condition<>();
		return this.originalidCondition;
	}
	
	/**
	 * 获取原始ID查询条件
	 * 
	 * @return originalidCondition 原始ID查询条件
	 */
	public Condition<String> getOriginalidCondition() {
		return originalidCondition;
	}

	/**
	 * 设置原始ID查询条件
	 * 
	 * @param originalidCondition 原始ID查询条件
	 */
	public void setOriginalidCondition(Condition<String> originalidCondition) {
		this.originalidCondition = originalidCondition;
	}

	/**
	 * 构造并返回秘钥 小程序填写查询条件
	 * 
	 * @return appsecretCondition 秘钥 小程序填写查询条件
	 */
	public Condition<String> appsecret() {
		this.appsecretCondition = new Condition<>();
		return this.appsecretCondition;
	}
	
	/**
	 * 获取秘钥 小程序填写查询条件
	 * 
	 * @return appsecretCondition 秘钥 小程序填写查询条件
	 */
	public Condition<String> getAppsecretCondition() {
		return appsecretCondition;
	}

	/**
	 * 设置秘钥 小程序填写查询条件
	 * 
	 * @param appsecretCondition 秘钥 小程序填写查询条件
	 */
	public void setAppsecretCondition(Condition<String> appsecretCondition) {
		this.appsecretCondition = appsecretCondition;
	}

	/**
	 * 构造并返回公钥查询条件
	 * 
	 * @return publicKeyCondition 公钥查询条件
	 */
	public Condition<String> publicKey() {
		this.publicKeyCondition = new Condition<>();
		return this.publicKeyCondition;
	}
	
	/**
	 * 获取公钥查询条件
	 * 
	 * @return publicKeyCondition 公钥查询条件
	 */
	public Condition<String> getPublicKeyCondition() {
		return publicKeyCondition;
	}

	/**
	 * 设置公钥查询条件
	 * 
	 * @param publicKeyCondition 公钥查询条件
	 */
	public void setPublicKeyCondition(Condition<String> publicKeyCondition) {
		this.publicKeyCondition = publicKeyCondition;
	}

	/**
	 * 构造并返回私钥查询条件
	 * 
	 * @return privateKeyCondition 私钥查询条件
	 */
	public Condition<String> privateKey() {
		this.privateKeyCondition = new Condition<>();
		return this.privateKeyCondition;
	}
	
	/**
	 * 获取私钥查询条件
	 * 
	 * @return privateKeyCondition 私钥查询条件
	 */
	public Condition<String> getPrivateKeyCondition() {
		return privateKeyCondition;
	}

	/**
	 * 设置私钥查询条件
	 * 
	 * @param privateKeyCondition 私钥查询条件
	 */
	public void setPrivateKeyCondition(Condition<String> privateKeyCondition) {
		this.privateKeyCondition = privateKeyCondition;
	}

	/**
	 * 构造并返回验签查询条件
	 * 
	 * @return decryptKeyCondition 验签查询条件
	 */
	public Condition<String> decryptKey() {
		this.decryptKeyCondition = new Condition<>();
		return this.decryptKeyCondition;
	}
	
	/**
	 * 获取验签查询条件
	 * 
	 * @return decryptKeyCondition 验签查询条件
	 */
	public Condition<String> getDecryptKeyCondition() {
		return decryptKeyCondition;
	}

	/**
	 * 设置验签查询条件
	 * 
	 * @param decryptKeyCondition 验签查询条件
	 */
	public void setDecryptKeyCondition(Condition<String> decryptKeyCondition) {
		this.decryptKeyCondition = decryptKeyCondition;
	}

	/**
	 * 构造并返回签名查询条件
	 * 
	 * @return signveriKeyCondition 签名查询条件
	 */
	public Condition<String> signveriKey() {
		this.signveriKeyCondition = new Condition<>();
		return this.signveriKeyCondition;
	}
	
	/**
	 * 获取签名查询条件
	 * 
	 * @return signveriKeyCondition 签名查询条件
	 */
	public Condition<String> getSignveriKeyCondition() {
		return signveriKeyCondition;
	}

	/**
	 * 设置签名查询条件
	 * 
	 * @param signveriKeyCondition 签名查询条件
	 */
	public void setSignveriKeyCondition(Condition<String> signveriKeyCondition) {
		this.signveriKeyCondition = signveriKeyCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdByCondition 查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdByCondition 查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedByCondition 查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedByCondition 查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedByCondition 查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回小程序小程序码查询条件
	 * 
	 * @return miniQrcodeUrlCondition 小程序小程序码查询条件
	 */
	public Condition<String> miniQrcodeUrl() {
		this.miniQrcodeUrlCondition = new Condition<>();
		return this.miniQrcodeUrlCondition;
	}
	
	/**
	 * 获取小程序小程序码查询条件
	 * 
	 * @return miniQrcodeUrlCondition 小程序小程序码查询条件
	 */
	public Condition<String> getMiniQrcodeUrlCondition() {
		return miniQrcodeUrlCondition;
	}

	/**
	 * 设置小程序小程序码查询条件
	 * 
	 * @param miniQrcodeUrlCondition 小程序小程序码查询条件
	 */
	public void setMiniQrcodeUrlCondition(Condition<String> miniQrcodeUrlCondition) {
		this.miniQrcodeUrlCondition = miniQrcodeUrlCondition;
	}

}
